<?php
namespace app\common\validate;

use think\Validate;

class ResumeValidate extends Validate
{
    protected $rule =   [
        'resume_id|简历ID'       => 'require|number',
        'expect_jobs|期望职位'   => 'require|length:1,30',
        'name|姓名'              => 'require|length:1,20',
        'sex|性别'               => 'require|number',
        'birthday|生日'          => 'require|date',
        'education|学历'         => 'require|number',
        'mobile|手机号'          => 'require|length:1,20',
        'card_num|身份证号'      => 'require|length:1,20',
        'address|地址'           => 'require|length:1,100',
        'wage|薪资'              => 'require|length:1,50',
        'jobs_status|目前状况'   => 'require|number',
        'self_evaluate|自我评价' => 'require|length:1,500',
    ];
    
    protected $scene = [
        /** api */
        'edit' => ['resume_id', 'expect_jobs', 'name', 'sex', 'birthday', 'education', 'mobile', 'card_num', 'address', 'wage', 'jobs_status', 'self_evaluate'],
    ];
}